import request from '@/utils/request'
import config from '@/utils/config'

// 分页查询报名管理
export function getRegistryList(params) {
  return request({
    url: config.BaseUrl + '/registry/manage/queryPage',
    method: 'get',
    params: params
  })
}

// 新增报名管理
export function addRegistry(params) {
  return request({
    url: config.BaseUrl + '/registry/manage/add',
    method: 'post',
    data: params
  })
}

// 查询报名管理详情
export function getRegistryManage(params) {
  return request({
    url: config.BaseUrl + '/registry/manage/queryInfo',
    method: 'get',
    params: params
  })
}

// 更新报名状态
export function registryStatus(params) {
  return request({
    url: config.BaseUrl + '/registry/manage/editStatus',
    method: 'post',
    data: params
  })
}

// 更新推荐状态
export function editRecommendStatus(params) {
  return request({
    url: config.BaseUrl + '/registry/manage/editRecommendStatus',
    method: 'post',
    data: params
  })
}

// 分页查询报名信息
export function getRegistryInfo(params) {
  return request({
    url: config.BaseUrl + '/registry/info/queryPage',
    method: 'get',
    params: params
  })
}

// 更新小程序端显示已报名数量状态
export function editShowNumStatus(params) {
  return request({
    url: config.BaseUrl + '/registry/manage/editShowNumStatus',
    method: 'post',
    data: params
  })
}

// 更新开启报名状态
export function editOpenStatus(params) {
  return request({
    url: config.BaseUrl + '/registry/manage/editOpenStatus',
    method: 'post',
    data: params
  })
}

// 报名入口颁奖
export function registryAward(params) {
  return request({
    url: config.BaseUrl + '/registry/award',
    method: 'post',
    data: params
  })
}

// 导出报名信息
export function registryDownload(params) {
  return request({
    url: config.BaseUrl + '/registry/info/download',
    method: 'get',
    params: params
  })
}

// 查询所有可变参数
export function getVariableParameters(params) {
  return request({
    url: config.BaseUrl + '/variableParameters/queryAll',
    method: 'get',
    params: params
  })
}

